<?php
  //表单数据
    require_once('connect.php');
    require_once('common.php');
		//接收前端传送过来的数据
		$username=$_GET['username'];
		$password=$_GET['password'];
		$email=$_GET['email'];
		$phone=$_GET['phone'];
    $sql="INSERT INTO `user` (`username`, `password`, `email`, `phone`) VALUES ('$username', '$password', '$email', '$phone')";
    $row=mysql_query($sql);
		$arr=array();
				if($row){
					$arr['code']=1;
				}
				else{
					$arr['code']=0;
				}
				echo json_encode($arr);
 ?>
